package com.yangmao.service.impl;

import com.github.pagehelper.PageHelper;
import com.yangmao.dao.BloodInfoDao;
import com.yangmao.entity.BloodInfo;
import com.yangmao.service.api.BloodInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ‘洋毛’
 * @version 1.0
 * @description: TODO
 * @date 2022/1/11 15:35
 */
@Service
public class BloodInfoServiceImpl implements BloodInfoService {
    @Autowired
    private BloodInfoDao BloodInfodao;

    @Override
    public List<BloodInfo> getAllBloodInfo(int page, int size) {
        PageHelper.startPage(page,size);
        return BloodInfodao.getAllBloodInfo();
    }

    @Override
    public void updateBloodInfo(BloodInfo BloodInfo) {
        BloodInfodao.updateBloodInfo(BloodInfo);
    }

    @Override
    public void deleteBloodInfo(String id) {
        BloodInfodao.deleteBloodInfo(id);
    }

    @Override
    public void addBloodInfo(BloodInfo BloodInfo) {
        BloodInfodao.addBloodInfo(BloodInfo);
    }

    @Override
    public BloodInfo getBloodInfoById(String id) {
        return BloodInfodao.getBloodInfoById(id);
    }
}
